Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Renderer Methods

This section describes methods that a renderer can or must support.

Some of the methods described here are required, as noted below.

The renderer support methods include update methods and submit methods. An update method is called whenever the state has changed, before invoking a submit method in a renderer. A renderer will have many update methods that do little more than copy data or pointers into the renderer's private state.

Updates are not called in any particular order and therefore cross-state dependencies should not be resolved until a submit method is invoked.For example, every view has an attribute state and a shader state, each of which may contain a SurfaceShader object. The attribute SurfaceShader object (if not null ) overrides the shader object, because it is inherited deeper in a geometry. However, a renderer should not depend on these being called in any particular order. It should not keep one surfaceShader state variable and perform this inheritance in the update methods, because the behavior may vary.

Some exceptions apply. In particular, matrix updates are called in a specific order based on matrix dependencies. For example, LocalToWorld is always called before LocalToWorldInverse , as explained on [link] .

Update methods update only those items which have changed, and only those objects supported by a renderer are updated. In addition, updates are accumulated until a geometry, light, or camera is encountered; therefore data submitted to the view may never reach a renderer if it never applies to a geometry, light, or camera.

If the renderer supports the RendererPush and RendererPop methods, it must maintain its own state stack; updates are not called for changed data when the view stack is popped. See "Push and Pop Methods" for more information.

The following renderer submit functionality is discussed in "Submit Method" :

    TQ3XRendererSubmitGeometryMethod

The following renderer configuration functionalities are discussed in "Configuration Methods" :

    kQ3XMethodTypeRendererIsInteractive
    TQ3XRendererModalConfigureMethod
    TQ3XRendererGetNickNameStringMethod
    TQ3XRendererGetConfigurationDataMethod
    TQ3XRendererSetConfigurationDataMethod

The following renderer update functionalities are discussed in "Update Methods" :

    TQ3XRendererUpdateStyleMethod
    TQ3XRendererUpdateAttributeMethod
    TQ3XRendererUpdateShaderMethod
    TQ3XRendererUpdateMatrixMethod

The following renderer drawing state methods are discussed in "Drawing State Methods" :

    TQ3XRendererStartFrameMethod
    TQ3XRendererStartPassMethod
    TQ3XRendererFlushFrameMethod
    TQ3XRendererEndPassMethod
    TQ3XRendererEndFrameMethod
    TQ3XRendererCancelMethod

The following state stack functions are discussed in "Push and Pop Methods" :

    TQ3XRendererPushMethod
    TQ3XRendererPopMethod

The renderer support method TQ3XRendererIsBoundingBoxVisibleMethod, used to cull group and geometric objects, is described in "Renderer Cull Method" .

Submit Method

Configuration Methods

Update Methods

Drawing State Methods

Push and Pop Methods

Renderer Cull Method


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |